#pragma once

#include "../common/BasePclModel.h"
#include "includeBase.h"

class MovingLeastSquaresModel : public BasePclModel
{
public:
    MovingLeastSquaresModel();

public:
    static MovingLeastSquaresModel& get();

public: // IJsonSerializable
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    QJsonObject toJson() const override;

public: // Property
    QString pcdFile() const { return pcdFile_; }
    void setPcdFile(const QString& pcdFile) { pcdFile_ = pcdFile; }

    int polynomialOrder() const { return polynomialOrder_; }
    void setPolynomialOrder(int polynomialOrder) { polynomialOrder_ = polynomialOrder; }

    double radiusSearch() const { return radiusSearch_; }
    void setRadiusSearch(double radiusSearch) { radiusSearch_ = radiusSearch; }

private:
    QString pcdFile_ = "<pcl>/test/bun0.pcd";

    int polynomialOrder_ = 2;
    double radiusSearch_ = 0.03;
};
